<template>
  <div>
    *结果输出在控制台
    <div>*点击按钮然后跳转到Apollo页面查看数字是否变化</div>
    {{count}}
  </div>
</template>

<script>
  import {mapGetters,mapActions} from 'vuex'
  export default {
    name: "Four",
    created() {
      this.testGraphql();
    },
    computed:{
      ...mapGetters(["count"])
    },
    methods: {
      testGraphql() {
        this.$apollo.query({
          query: require('@/graphql/plaitTroops.gql'),
          variables: {},
          fetchPolicy: 'network-only'
        }).then((data) => {
          console.log(data);
        });
      }
    }

  }
</script>

<style scoped>

</style>
